package iodemo;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class testFirstIO
{
    public static void main (String[] args) throws IOException
    {
    
        try(FileInputStream fileInputStream = new FileInputStream("D:/debug.log"))
        {
            StringBuilder stringBuilder = new StringBuilder();
            int temp = 0;
        
            while((temp = fileInputStream.read()) != -1)
            {
                stringBuilder.append((char) temp);
            }
        
            System.out.println(stringBuilder);
        }
        catch(FileNotFoundException e)
        {
            e.printStackTrace();
        }
    }
}
